<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:aop="http://www.springframework.org/schema/aop"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">

    <context:component-scan base-package="com.dongfg.zcmserver"/>

    <!-- response body encoding -->
    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>
    <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
        <property name="messageConverters">
            <list>
                <bean class="org.springframework.http.converter.StringHttpMessageConverter">
                    <constructor-arg>
                        <bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
                            <property name="targetClass" value="java.nio.charset.Charset"/>
                            <property name="targetMethod" value="forName"/>
                            <property name="arguments" value="UTF-8"/>
                        </bean>
                    </constructor-arg>
                </bean>
            </list>
        </property>
    </bean>

    <!-- version checker -->
    <bean class="com.dongfg.zcmserver.aspect.ApiVersionCheckAspect"/>
    <aop:aspectj-autoproxy proxy-target-class="true"/>
</beans>